-- Leader key
vim.g.mapleader = " "

-- Gets rid of the annoying banner for netrw
vim.g.netrw_banner = 0
-- Open in prior window
-- vim.g.netrw_browse_split = 4
-- Change from left splitting to right splitting
-- vim.g.netrw_altv = 1
-- Tree style view in netrw
vim.g.netrw_liststyle = 3
-- Window size
vim.g.netrw_winsize = 30
-- Track browsing directory
vim.g.netrw_keepdir = 1

--Scrolloff
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8

--Allow copy to system cliboard
vim.opt.clipboard = 'unnamedplus'

--Enable mouse mode
vim.opt.mouse = 'a'

--Enable break indent
vim.opt.breakindent = true

--Save undo history
vim.opt.undofile = true

--Case insensitive searching UNLESS /C or capital in search
vim.opt.ignorecase = true
vim.opt.smartcase = true

--Time in milliseconds to wait for a mapped sequence to complete
vim.opt.timeoutlen = 350

--Decrease update time
vim.opt.updatetime = 50
vim.opt.signcolumn = 'yes'

--Set colorscheme
vim.opt.termguicolors = true

--Set completeopt to have a better completion experience
vim.opt.completeopt = 'menuone,noselect'

--Creates a backup file
vim.opt.backup = false

--So that `` is visible in markdown files
vim.opt.conceallevel = 0

--The encoding written to a file
vim.opt.fileencoding = "utf-8"

--Highlight all matches on previous search pattern
vim.opt.hlsearch = true

--Pop up menu height
vim.opt.pumheight = 10

--We don't need to see things like -- INSERT -- anymore
vim.opt.showmode = false

--Make indenting smarter again
vim.opt.smartindent = true

--Force all horizontal splits to go below current window
vim.opt.splitbelow = true

--Force all vertical splits to go to the right of current window
vim.opt.splitright = true

--Creates a swapfile
vim.opt.swapfile = false

--If a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
vim.opt.writebackup = false

--Convert tabs to spaces
-- vim.opt.expandtab = true

--The number of spaces inserted for each indentation
vim.opt.shiftwidth = 2

--Insert 4 spaces for a tab
vim.opt.tabstop = 2

--Highlight the current line
vim.opt.cursorline = true

--Set numbered lines
vim.opt.number = true

--Set relative numbered lines
vim.opt.relativenumber = true

--Set number column width to 2 {default 4}
vim.opt.numberwidth = 4

--Display lines as one long line
vim.opt.wrap = true

--Custom listchars
vim.opt.list = true

-- vim.opt.listchars = 'tab:-->,lead:·,trail:·,eol:$'
vim.opt.listchars:append "trail:·"
vim.opt.listchars:append "space:·"
vim.opt.listchars:append "eol:$"
vim.opt.listchars:append "tab:| "
